#include <gnome.h>

gdouble cb_percent(gdouble *pct){
	if((*pct += 0.01) >= 1.0)
		*pct = 0.0;
	return *pct;
}

void cb_cancel(gdouble *pct){
	g_print("pct is %f at end\n",*pct);
	gtk_main_quit();
}

int main(int argc,char *argv[]){
	GtkWidget *app;
	gdouble pct = 0.0;
	GnomeAppProgressKey *key;

	gnome_init("","",argc,argv);
	app = gnome_app_new("","");
	key = gnome_app_progress_timeout(GNOME_APP(app),"Label for Progress Bar",
		50,(GnomeAppProgressFunc)cb_percent,(GnomeAppProgressCancelFunc)cb_cancel,&pct);
	gtk_main();
	return 0;
}